package com.example.graphicslib.test;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.example.graphicslib.R;
import com.example.graphicslib.utils.Constants;

public class ParamSetActivity extends ActionBarActivity {

    public static final String PARAM = "param";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_param);

        final String type = getIntent().getStringExtra(Constants.TYPE);

        et = (EditText)findViewById(R.id.editText);
        doneBtn = (Button)findViewById(R.id.doneBtn);

        doneBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String param = et.getText().toString();
                Intent intent = new Intent(ParamSetActivity.this, MovementAnimationExampleActivity.class);
                intent.putExtra(Constants.TYPE, type);
                intent.putExtra(PARAM, param);
                startActivity(intent);
            }
        });
    }

    private EditText et;
    private Button doneBtn;
}
